package net.comm.friend.db;


import java.sql.ResultSet;
import java.sql.SQLException;


import net.comm.friend.bean.BaseLinju;
import net.comm.util.StringUtil;

import org.sakaiproject.db.api.SqlReader;

public class DbLinjuService implements SqlReader
{

	/**
	 * Read from the result one set of fields to create a Resource.
	 * 
	 * @param result
	 *        The Sql query result.
	 * @return The Resource object.
	 */
	public Object readSqlResultRecord(ResultSet result)
	{
		try
		{
			
			int  userID = result.getInt(1);				//会员ID
			int  linjuID = result.getInt(2);			//
			String  status = StringUtil.getValue(result.getString(3));			//操作类型
			String  mtime = StringUtil.getValue(result.getString(4));				

			// create the Resource from these fields
			return new BaseLinju( userID, linjuID, status, mtime);
		}
		catch (SQLException e)
		{
			return null;
		}
		
	}
}
